<template>
  <div class="page">
    <group title="选择一个团队进入设置">
      <cell :title="teamName" v-for="(teamName, teamId) in loginUser.my_team_list" :key="teamId" value="进入设置" :link="{name: 'member-manage', query: {team_id: teamId}}" ></cell>
      <!--<cell :title="item.team_name" v-else v-for="(item) in loginUser.teams" :key="item.team_id" value="进入设置" :link="{name: 'member-manage', query: {team_id: item.team_id}}" ></cell>-->
    </group>
  </div>
</template>
<script>
  import Group from 'vux/src/components/group'
  import Cell from 'vux/src/components/cell'
  import { mapActions, mapState } from 'vuex'
  export default {
    methods: {
      ...mapActions({
        'getTeams': 'getTeams'
      })
    },
    mounted () {
      // this.getTeams({page_size: 100})
      // .then((response) => {
      //   if (response.data.errcode === 0) {
      //     let teams = response.data.results.teams
      //     this.teams = teams
      //   }
      // })
    },
    computed: {
      ...mapState({
        loginUser: state => state.app.user
      })
    },
    components: {
      Group,
      Cell
    },
    data () {
      return {
        teams: []
      }
    }
  }
</script>
<style lang="less"></style>
